package com.zhoug.map3.dianditu;

import androidx.annotation.Keep;

/**
 * @Author: zhoug
 * @Date: 2025-01-03
 * @Description:
 */
@Keep
 class GeocoderResult {
    /**
     * OK：正常，其他异常。
     */
    private String msg;

    /**
     * 状态
     * 0：正常返回，101：结果为空，404：出错。
     */
    private int status;
    /**
     * 地理编码查询结果地址信息
     */
    private GeocoderLocation location;
    /**
     * 逆地理编码查询结果地址信息
     */
    private Result result;


    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }


    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public GeocoderLocation getLocation() {
        return location;
    }

    public void setLocation(GeocoderLocation location) {
        this.location = location;
    }

    public boolean isSuccess() {
        return status == 0;
    }

    public Result getResult() {
        return result;
    }

    public void setResult(Result result) {
        this.result = result;
    }

    @Keep
    public static final class Result {
        private String formatted_address;
        private GeocoderLocation location;
        private AddressComponent addressComponent;//此点的具体信息

        public String getFormatted_address() {
            return formatted_address;
        }

        public void setFormatted_address(String formatted_address) {
            this.formatted_address = formatted_address;
        }

        public GeocoderLocation getLocation() {
            return location;
        }

        public void setLocation(GeocoderLocation location) {
            this.location = location;
        }

        public AddressComponent getAddressComponent() {
            return addressComponent;
        }

        public void setAddressComponent(AddressComponent addressComponent) {
            this.addressComponent = addressComponent;
        }
    }

    @Keep
    public static final class AddressComponent {
        private String address;//此点最近地点信息 "西南政法大学渝北校区内",
        private int address_distance;//此点距离最近地点信息距离 0,
        private String address_position;//此点在最近地点信息方向 "",
        private String province;//"重庆市",
        private String province_code;//"156500000",
        private String county;//"渝北区",
        private String county_code;//"156500112",
        private String city;//此点所在国家或城市或区县 "",
        private String city_code;//"",
        private String town;//"宝圣湖街道",
        private String town_code;//"156500112020",
        private String nation;//"中国",
        private String poi;//距离此点最近poi点 "西南政法大学司法鉴定中心",
        private String poi_position;//此点在最近poi点的方向 "",
        private int poi_distance;//距离此点最近poi点的距离 0
        private String road;//距离此点最近的路 "东山路",
        private int road_distance;//此点距离此路的距离 24,

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public int getAddress_distance() {
            return address_distance;
        }

        public void setAddress_distance(int address_distance) {
            this.address_distance = address_distance;
        }

        public String getAddress_position() {
            return address_position;
        }

        public void setAddress_position(String address_position) {
            this.address_position = address_position;
        }

        public String getProvince() {
            return province;
        }

        public void setProvince(String province) {
            this.province = province;
        }

        public String getProvince_code() {
            return province_code;
        }

        public void setProvince_code(String province_code) {
            this.province_code = province_code;
        }

        public String getCounty() {
            return county;
        }

        public void setCounty(String county) {
            this.county = county;
        }

        public String getCounty_code() {
            return county_code;
        }

        public void setCounty_code(String county_code) {
            this.county_code = county_code;
        }

        public String getCity() {
            return city;
        }

        public void setCity(String city) {
            this.city = city;
        }

        public String getCity_code() {
            return city_code;
        }

        public void setCity_code(String city_code) {
            this.city_code = city_code;
        }

        public String getTown() {
            return town;
        }

        public void setTown(String town) {
            this.town = town;
        }

        public String getTown_code() {
            return town_code;
        }

        public void setTown_code(String town_code) {
            this.town_code = town_code;
        }

        public String getNation() {
            return nation;
        }

        public void setNation(String nation) {
            this.nation = nation;
        }

        public String getPoi() {
            return poi;
        }

        public void setPoi(String poi) {
            this.poi = poi;
        }

        public String getPoi_position() {
            return poi_position;
        }

        public void setPoi_position(String poi_position) {
            this.poi_position = poi_position;
        }

        public int getPoi_distance() {
            return poi_distance;
        }

        public void setPoi_distance(int poi_distance) {
            this.poi_distance = poi_distance;
        }

        public String getRoad() {
            return road;
        }

        public void setRoad(String road) {
            this.road = road;
        }

        public int getRoad_distance() {
            return road_distance;
        }

        public void setRoad_distance(int road_distance) {
            this.road_distance = road_distance;
        }
    }
}
